package com.ymatou.iapi.productitem.service;

import org.json.JSONObject;

import com.ymt.base.YmatouBaseCall;
import com.ymttest.utils.EnvSetup;


public class GetProductInfoByProductIdCall extends YmatouBaseCall{
	private static String opurl ="/api/Product/GetProductInfoByProductId";
	
	public GetProductInfoByProductIdCall() {
		super(EnvSetup.getSystemUrl("productitem"),opurl,"GET","PARAMETER");
	}
	@Override
	public void addDefHeader() {
		client.addHeader("Accept","text/xml,text/javascript,text/html,application/json");
		client.addHeader("Content-Type", "application/json; charset=UTF-8");
	}
	//获取某商品的返回信息
	public static JSONObject GetProductInfoByProductId(String sProductId) throws Exception{
		GetProductInfoByProductIdCall getProductInfoByProductIdCall=new GetProductInfoByProductIdCall();
		getProductInfoByProductIdCall.setData("ProductId=" + sProductId);
		getProductInfoByProductIdCall.callService();
		return  new JSONObject(getProductInfoByProductIdCall.getReturnData()) ;
	}
	
	
	
	public static void main(String[] args) throws Exception {
		JSONObject aJsonObject = GetProductInfoByProductIdCall.GetProductInfoByProductId("1d539bca-00de-40b0-b116-cdba5f671bab");
		int a= 1;
	}

}
